900 |
How can I prevent a link to end to a specified bar
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowLinkBars(true); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,160); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Not-End-Linkable"); com_Items.AddBar(h,"Unknown",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("6/28/2005",213))); com_Items.ItemBar(h,"",31/*exBarCanEndLink*/,COMVariant::createFromBoolean(false)); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("6/23/2005",213)),COMVariant::createFromDate(str2Date("6/27/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("6/23/2005",213)),COMVariant::createFromDate(str2Date("6/27/2005",213)),""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,160); } */ |
899 |
How can I prevent a link to start from a specified bar
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowLinkBars(true); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,160); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Not-Start-Linkable"); com_Items.AddBar(h,"Unknown",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("6/28/2005",213))); com_Items.ItemBar(h,"",30/*exBarCanStartLink*/,COMVariant::createFromBoolean(false)); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("6/23/2005",213)),COMVariant::createFromDate(str2Date("6/27/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("6/23/2005",213)),COMVariant::createFromDate(str2Date("6/27/2005",213)),""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,160); } */ |
898 |
How can I prevent a specified bar to be linked
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowLinkBars(true); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,160); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Not-Linkable"); com_Items.AddBar(h,"Unknown",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("6/28/2005",213))); com_Items.ItemBar(h,"",32/*exBarCanBeLinked*/,COMVariant::createFromBoolean(false)); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("6/23/2005",213)),COMVariant::createFromDate(str2Date("6/27/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("6/23/2005",213)),COMVariant::createFromDate(str2Date("6/27/2005",213)),""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,160); } */ |
897 |
How can I display in the chart's header only days where the week starts
public void init() { COM com_Chart,com_Level,com_Level1; anytype var_Chart,var_Level,var_Level1; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,0); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/31/2009",213))); com_Chart.LevelCount(2); com_Chart.FirstWeekDay(1/*exMonday*/); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Label("<%mmmm%> <%yyyy%>"); com_Level.Alignment(1/*CenterAlignment*/); com_Level.Unit(16/*exMonth*/); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Unit(4096/*exDay*/); com_Level1.FormatLabel(" (0:=weekday(dvalue)) = 1 ? '<b>' +value : '' "); com_Chart.UnitWidth(23); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,0); } */ |
896 |
Is there any automatically way to display and change the bar's duration in the columns section
public void init() { COM com_Chart,com_Column,com_Columns,com_Editor,com_Items; anytype var_Chart,var_Column,var_Columns,var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Duration")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(513)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(4/*SpinType*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2009",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2009",213)),COMVariant::createFromDate(str2Date("1/7/2009",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2009",213)),COMVariant::createFromDate(str2Date("1/9/2009",213))); exg2antt1.EndUpdate(); } |
895 |
How can I programatically move or resize a bar using spin or slider controls in the columns
public void init() { COM com_Chart,com_Column,com_Column1,com_Columns,com_Editor,com_Items; anytype var_Chart,var_Column,var_Column1,var_Columns,var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(4/*SpinType*/); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor; com_Editor.EditType(4/*SpinType*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.ShowEmptyBars(1); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2009",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2009",213)),COMVariant::createFromDate(str2Date("1/7/2009",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2009",213)),COMVariant::createFromDate(str2Date("1/9/2009",213))); exg2antt1.EndUpdate(); } |
894 |
I am trying to call the ItemBar(exBarStart) after curent ending point, and the bar is not updated. What I am doing wrong
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,64); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/21/2005",213))); com_Chart.ShowEmptyBars(1); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Test"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/22/2005",213)),COMVariant::createFromDate(str2Date("6/26/2005",213)),""); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/27/2005",213)),com_Items.ItemBar(h,"",2/*exBarEnd*/)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,64); } */ |
893 |
How can change in the same time the starting and ending points of the bar
public void init() { COM com_Chart,com_Items,com_Items1; anytype var_Chart,var_Items,var_Items1; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,64); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/21/2005",213))); com_Chart.ShowEmptyBars(1); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Test"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/22/2005",213)),COMVariant::createFromDate(str2Date("6/26/2005",213))); var_Items1 = exg2antt1.Items(); com_Items1 = var_Items1; h = com_Items1.FirstVisibleItem(); com_Items1.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/27/2005",213)),COMVariant::createFromDate(str2Date("6/29/2005",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,64); } */ |
892 |
How can I control the exBarEffort property of the bar using slider controls
public void init() { COM com_Bar,com_Chart,com_Column,com_Column1,com_Editor,com_Items; anytype var_Bar,var_Chart,var_Column,var_Column1,var_Editor,var_Items; int h,h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.ShowFocusRect(false); exg2antt1.OnResizeControl(1/*exResizeChart*/); COM::createFromVariant(exg2antt1.Columns().Add("Tasks")).AllowDragging(false); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Histogram")); com_Column = var_Column; com_Column.AllowDragging(false); com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); com_Column.AllowSizing(false); com_Column.Width(18); com_Column.LevelKey(COMVariant::createFromInt(1)); exg2antt1.Items().AllowCellValueToItemBar(true); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Effort")); com_Column1 = var_Column1; com_Column1.LevelKey(COMVariant::createFromInt(1)); com_Column1.AllowDragging(false); com_Column1.AllowSizing(false); com_Column1.Width(64); com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(21)); var_Editor = com_Column1.Editor(); com_Editor = var_Editor; com_Editor.EditType(20/*SliderType*/); com_Editor.Option(41/*exSliderWidth*/,COMVariant::createFromInt(-100)); com_Editor.Option(44/*exSliderMax*/,COMVariant::createFromInt(9)); com_Editor.Option(43/*exSliderMin*/,COMVariant::createFromInt(1)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(3); com_Chart.NonworkingDays(0); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,160); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramView(67348/*0x10714 | exHistogramNoGrouping | exHistogramRecLeafItems | exHistogramLeafItems | exHistogramUnlockedItems | exHistogramCheckedItems*/); com_Chart.HistogramHeight(64); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramCriticalColor(WinApi::RGB2int(255,0,0)); com_Bar.HistogramPattern(512/*exBezierCurve*/); com_Bar.HistogramType(1/*exHistOverAllocation*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project 1"); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("7/1/2005",213))); com_Items.CellEditorVisible(h,COMVariant::createFromInt(2),false); com_Items.CellValue(h,COMVariant::createFromInt(2),""); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("6/28/2005",213))); com_Items.CellMerge(h1,COMVariant::createFromInt(0),COMVariant::createFromInt(1)); com_Items.DefineSummaryBars(h,"",h1,""); h1 = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/23/2005",213)),COMVariant::createFromDate(str2Date("7/1/2005",213)),""); com_Items.CellMerge(h1,COMVariant::createFromInt(0),COMVariant::createFromInt(1)); com_Items.DefineSummaryBars(h,"",h1,""); com_Items.ItemBar(h1,"",21/*exBarEffort*/,COMVariant::createFromInt(5)); h1 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/25/2005",213)),COMVariant::createFromDate(str2Date("6/27/2005",213)),""); com_Items.CellMerge(h1,COMVariant::createFromInt(0),COMVariant::createFromInt(1)); com_Items.DefineSummaryBars(h,"",h1,""); com_Items.ExpandItem(h,true); com_Items.CellState(h,COMVariant::createFromInt(1),1); h = com_Items.AddItem("Project 2"); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("3/7/2005",213)),COMVariant::createFromDate(str2Date("7/12/2005",213))); com_Items.CellEditorVisible(h,COMVariant::createFromInt(2),false); com_Items.CellValue(h,COMVariant::createFromInt(2),""); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("7/3/2005",213)),COMVariant::createFromDate(str2Date("7/8/2005",213))); com_Items.CellMerge(h1,COMVariant::createFromInt(0),COMVariant::createFromInt(1)); com_Items.DefineSummaryBars(h,"",h1,""); h1 = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("7/5/2005",213)),COMVariant::createFromDate(str2Date("7/12/2005",213)),""); com_Items.CellMerge(h1,COMVariant::createFromInt(0),COMVariant::createFromInt(1)); com_Items.DefineSummaryBars(h,"",h1,""); com_Items.ItemBar(h1,"",21/*exBarEffort*/,COMVariant::createFromInt(5)); h1 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("7/7/2005",213)),COMVariant::createFromDate(str2Date("7/8/2005",213)),""); com_Items.CellMerge(h1,COMVariant::createFromInt(0),COMVariant::createFromInt(1)); com_Items.DefineSummaryBars(h,"",h1,""); com_Items.ExpandItem(h,true); com_Items.CellState(h,COMVariant::createFromInt(1),1); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,160); } */ |
891 |
How can I determine if there is any Redo operation
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; boolean var_CanRedo; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowUndoRedo(true); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); var_CanRedo = exg2antt1.Chart().CanRedo(); } |
890 |
How can I determine if there is any Undo operation
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; boolean var_CanUndo; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowUndoRedo(true); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); var_CanUndo = exg2antt1.Chart().CanUndo(); } |
889 |
How can I turn on the Undo/Redo feature
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowUndoRedo(true); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); } |
888 |
How can I disable resizing the histogram at runtime
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; ; super(); exg2antt1.OnResizeControl(256/*exDisableHistogram*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(32); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(6/*exPatternBDiagonal*/); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); } |
887 |
How can I display automatically the start and end dates of the bars in the columns section
public void init() { COM com_Chart,com_Column,com_Column1,com_Columns,com_Editor,com_Items; anytype var_Chart,var_Column,var_Column1,var_Columns,var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(true); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,196); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("9/23/2006",213)),COMVariant::createFromDate(str2Date("9/26/2006",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,196); } */ |
886 |
How can I enable Undo/Redo support
public void init() { COM com_Chart,com_Column,com_Column1,com_Columns,com_Editor,com_Items; anytype var_Chart,var_Column,var_Column1,var_Columns,var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.DrawGridLines(1/*exHLines*/); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); com_Column.LevelKey(COMVariant::createFromInt(1)); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); com_Column1.LevelKey(COMVariant::createFromInt(1)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.DrawGridLines(1/*exHLines*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(true); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,196); com_Chart.AllowUndoRedo(true); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("9/23/2006",213)),COMVariant::createFromDate(str2Date("9/26/2006",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,196); } */ |
885 |
Is there any option to update the bar's properties once the cell's value is changed ( associate the cell with bar )
public void init() { COM com_Chart,com_Columns,com_Editor,com_Editor1,com_Items; anytype var_Chart,var_Columns,var_Editor,var_Editor1,var_Items; int h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); exg2antt1.MarkSearchColumn(false); exg2antt1.Items().AllowCellValueToItemBar(true); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Editor = COM::createFromObject(COM::createFromVariant(com_Columns.Add("Start"))).Editor(); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); var_Editor = COM::createFromObject(COM::createFromVariant(com_Columns.Add("End"))).Editor(); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); com_Columns.Add("Info"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(false); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,224); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.InsertItem(,,"Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/23/2006",213)),"A","Caption"); com_Items.ItemBar(h1,"A",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); var_Editor = COM::createFromObject(com_Items.CellEditor(h1,COMVariant::createFromInt(3))); com_Editor = var_Editor; com_Editor.EditType(1/*EditType*/); com_Items.CellValueToItemBar(h1,COMVariant::createFromInt(1),1/*exBarStart*/,"A"); com_Items.CellValueToItemBar(h1,COMVariant::createFromInt(2),2/*exBarEnd*/,"A"); com_Items.CellValueToItemBar(h1,COMVariant::createFromInt(3),3/*exBarCaption*/,"A"); h2 = com_Items.InsertItem(,,"Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213)),"B"); var_Editor = com_Items.CellEditor(h2,COMVariant::createFromInt(3)); com_Editor = var_Editor; com_Editor.EditType(20/*SliderType*/); com_Editor.Option(41/*exSliderWidth*/,COMVariant::createFromInt(-100)); com_Items.CellValueToItemBar(h2,COMVariant::createFromInt(1),1/*exBarStart*/,"B"); com_Items.CellValueToItemBar(h2,COMVariant::createFromInt(2),2/*exBarEnd*/,"B"); com_Items.CellValueToItemBar(h2,COMVariant::createFromInt(3),19/*exBarTransparent*/,"B"); h3 = com_Items.InsertItem(,,"Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("9/23/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213)),"C"); var_Editor1 = com_Items.CellEditor(h3,COMVariant::createFromInt(3)); com_Editor1 = var_Editor1; com_Editor1.EditType(2/*DropDownType*/); com_Editor1.AddItem(0,"Task"); com_Editor1.AddItem(1,"Progress"); com_Editor1.AddItem(2,"Project Summary"); com_Editor1.AddItem(2,"Summary"); com_Items.CellValueToItemBar(h3,COMVariant::createFromInt(1),1/*exBarStart*/,"C"); com_Items.CellValueToItemBar(h3,COMVariant::createFromInt(2),2/*exBarEnd*/,"C"); com_Items.CellValueToItemBar(h3,COMVariant::createFromInt(3),0/*exBarName*/,"C"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,224); } */ |
884 |
Is there any option to update the bar's properties once the cell's value is changed ( associate the column/cell with bars )
public void init() { COM com_Chart,com_Column,com_Column1,com_Column2,com_Columns,com_Editor,com_Items; anytype var_Chart,var_Column,var_Column1,var_Column2,var_Columns,var_Editor,var_Items; int h,h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.Indent(11); exg2antt1.HasLines(1/*exSolidLine*/); exg2antt1.Items().AllowCellValueToItemBar(true); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); com_Column.LevelKey(COMVariant::createFromInt(1)); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); com_Column1.LevelKey(COMVariant::createFromInt(1)); var_Column2 = COM::createFromVariant(com_Columns.Add("Transparency")); com_Column2 = var_Column2; com_Column2.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(19)); var_Editor = com_Column2.Editor(); com_Editor = var_Editor; com_Editor.EditType(20/*SliderType*/); com_Editor.Option(41/*exSliderWidth*/,COMVariant::createFromInt(-100)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(false); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,224); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("10/3/2006",213))); com_Items.CellEditorVisible(h,COMVariant::createFromInt(1),false); com_Items.CellEditorVisible(h,COMVariant::createFromInt(2),false); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213))); h2 = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("9/24/2006",213)),COMVariant::createFromDate(str2Date("9/28/2006",213))); h3 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("9/28/2006",213)),COMVariant::createFromDate(str2Date("10/3/2006",213))); com_Items.DefineSummaryBars(h,"",h1,""); com_Items.DefineSummaryBars(h,"",h2,""); com_Items.DefineSummaryBars(h,"",h3,""); com_Items.ExpandItem(h,true); com_Items.ItemBold(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,224); } */ |
883 |
How can I group two bars so I can specify the range or the limit of the interval between them
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h,h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.OnResizeControl(1/*exResizeChart*/); exg2antt1.Columns().Add("Tasks"); COM::createFromVariant(exg2antt1.Columns().Add("Start")).Visible(false); COM::createFromVariant(exg2antt1.Columns().Add("End")).Visible(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,64); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("9/21/2006",213))); com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromDate(str2Date("10/3/2006",213))); com_Items.AddBar(h,"Summary",com_Items.CellValue(h,COMVariant::createFromInt(1)),com_Items.CellValue(h,COMVariant::createFromInt(2)),"sum"); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.CellValue(h1,COMVariant::createFromInt(1),com_Items.CellValue(h,COMVariant::createFromInt(1))); com_Items.CellValue(h1,COMVariant::createFromInt(2),COMVariant::createFromDate(str2Date("9/24/2006",213))); com_Items.AddBar(h1,"Task",com_Items.CellValue(h1,COMVariant::createFromInt(1)),com_Items.CellValue(h1,COMVariant::createFromInt(2)),"K1"); h2 = com_Items.InsertItem(h,,"Task 2"); com_Items.CellValue(h2,COMVariant::createFromInt(1),com_Items.CellValue(h1,COMVariant::createFromInt(2))); com_Items.CellValue(h2,COMVariant::createFromInt(2),COMVariant::createFromDate(str2Date("9/28/2006",213))); com_Items.AddBar(h2,"Unknown",com_Items.CellValue(h2,COMVariant::createFromInt(1)),com_Items.CellValue(h2,COMVariant::createFromInt(2)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); h3 = com_Items.InsertItem(h,,"Task 3"); com_Items.CellValue(h3,COMVariant::createFromInt(1),com_Items.CellValue(h2,COMVariant::createFromInt(2))); com_Items.CellValue(h3,COMVariant::createFromInt(2),com_Items.CellValue(h,COMVariant::createFromInt(2))); com_Items.AddBar(h3,"Task",com_Items.CellValue(h3,COMVariant::createFromInt(1)),com_Items.CellValue(h3,COMVariant::createFromInt(2)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.GroupBars(h1,"K1",false,h2,"K2",true,COMVariant::createFromInt(31),"0;4"); com_Items.GroupBars(h2,"K2",false,h3,"K3",true,COMVariant::createFromInt(31),"0;2"); com_Items.DefineSummaryBars(h,"sum",h1,"K1"); com_Items.DefineSummaryBars(h,"sum",h2,"K2"); com_Items.DefineSummaryBars(h,"sum",h3,"K3"); com_Items.ExpandItem(h,true); com_Items.ItemBold(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,64); } */ |
882 |
How can I group my bars so I can resize the interval between them but still keep the lengths of them
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h,h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.OnResizeControl(1/*exResizeChart*/); exg2antt1.Columns().Add("Tasks"); COM::createFromVariant(exg2antt1.Columns().Add("Start")).Visible(false); COM::createFromVariant(exg2antt1.Columns().Add("End")).Visible(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,64); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("9/21/2006",213))); com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromDate(str2Date("10/3/2006",213))); com_Items.AddBar(h,"Summary",com_Items.CellValue(h,COMVariant::createFromInt(1)),com_Items.CellValue(h,COMVariant::createFromInt(2))); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.CellValue(h1,COMVariant::createFromInt(1),com_Items.CellValue(h,COMVariant::createFromInt(1))); com_Items.CellValue(h1,COMVariant::createFromInt(2),COMVariant::createFromDate(str2Date("9/24/2006",213))); com_Items.AddBar(h1,"Task",com_Items.CellValue(h1,COMVariant::createFromInt(1)),com_Items.CellValue(h1,COMVariant::createFromInt(2))); h2 = com_Items.InsertItem(h,,"Task 2"); com_Items.CellValue(h2,COMVariant::createFromInt(1),com_Items.CellValue(h1,COMVariant::createFromInt(2))); com_Items.CellValue(h2,COMVariant::createFromInt(2),COMVariant::createFromDate(str2Date("9/28/2006",213))); com_Items.AddBar(h2,"Unknown",com_Items.CellValue(h2,COMVariant::createFromInt(1)),com_Items.CellValue(h2,COMVariant::createFromInt(2))); com_Items.AddLink("L1",h1,"",h2,""); h3 = com_Items.InsertItem(h,,"Task 3"); com_Items.CellValue(h3,COMVariant::createFromInt(1),com_Items.CellValue(h2,COMVariant::createFromInt(2))); com_Items.CellValue(h3,COMVariant::createFromInt(2),com_Items.CellValue(h,COMVariant::createFromInt(2))); com_Items.AddBar(h3,"Task",com_Items.CellValue(h3,COMVariant::createFromInt(1)),com_Items.CellValue(h3,COMVariant::createFromInt(2))); com_Items.AddLink("L2",h2,"",h3,""); com_Items.GroupBars(h1,"",false,h2,"",true,COMVariant::createFromInt(35)); com_Items.GroupBars(h2,"",false,h3,"",true,COMVariant::createFromInt(35)); com_Items.DefineSummaryBars(h,"",h1,""); com_Items.DefineSummaryBars(h,"",h2,""); com_Items.DefineSummaryBars(h,"",h3,""); com_Items.ExpandItem(h,true); com_Items.ItemBold(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,64); } */ |
881 |
Can I group my bars so they move together when a bar inside changes, but still preserving the length of the bars
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h,h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.OnResizeControl(1/*exResizeChart*/); exg2antt1.Columns().Add("Tasks"); COM::createFromVariant(exg2antt1.Columns().Add("Start")).Visible(false); COM::createFromVariant(exg2antt1.Columns().Add("End")).Visible(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,64); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("9/21/2006",213))); com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromDate(str2Date("10/3/2006",213))); com_Items.AddBar(h,"Summary",com_Items.CellValue(h,COMVariant::createFromInt(1)),com_Items.CellValue(h,COMVariant::createFromInt(2))); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.CellValue(h1,COMVariant::createFromInt(1),com_Items.CellValue(h,COMVariant::createFromInt(1))); com_Items.CellValue(h1,COMVariant::createFromInt(2),COMVariant::createFromDate(str2Date("9/24/2006",213))); com_Items.AddBar(h1,"Task",com_Items.CellValue(h1,COMVariant::createFromInt(1)),com_Items.CellValue(h1,COMVariant::createFromInt(2))); h2 = com_Items.InsertItem(h,,"Task 2"); com_Items.CellValue(h2,COMVariant::createFromInt(1),com_Items.CellValue(h1,COMVariant::createFromInt(2))); com_Items.CellValue(h2,COMVariant::createFromInt(2),COMVariant::createFromDate(str2Date("9/28/2006",213))); com_Items.AddBar(h2,"Unknown",com_Items.CellValue(h2,COMVariant::createFromInt(1)),com_Items.CellValue(h2,COMVariant::createFromInt(2))); com_Items.AddLink("L1",h1,"",h2,""); h3 = com_Items.InsertItem(h,,"Task 3"); com_Items.CellValue(h3,COMVariant::createFromInt(1),com_Items.CellValue(h2,COMVariant::createFromInt(2))); com_Items.CellValue(h3,COMVariant::createFromInt(2),com_Items.CellValue(h,COMVariant::createFromInt(2))); com_Items.AddBar(h3,"Task",com_Items.CellValue(h3,COMVariant::createFromInt(1)),com_Items.CellValue(h3,COMVariant::createFromInt(2))); com_Items.AddLink("L2",h2,"",h3,""); com_Items.GroupBars(h1,"",false,h2,"",true,COMVariant::createFromInt(3)); com_Items.GroupBars(h2,"",false,h3,"",true,COMVariant::createFromInt(3)); com_Items.DefineSummaryBars(h,"",h1,""); com_Items.DefineSummaryBars(h,"",h2,""); com_Items.DefineSummaryBars(h,"",h3,""); com_Items.ExpandItem(h,true); com_Items.ItemBold(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,64); } */ |
880 |
How can I split the time scale, so a section displays days, while other displays weeks, and the other months
public void init() { COM com_Chart,com_InsideZoom,com_InsideZoom1,com_InsideZoomFormat,com_InsideZoomFormat1,com_InsideZoomFormat2,com_InsideZooms,com_Items,com_Level,com_Level1,com_Level2; anytype var_Chart,var_InsideZoom,var_InsideZoom1,var_InsideZoomFormat,var_InsideZoomFormat1,var_InsideZoomFormat2,var_InsideZooms,var_Items,var_Level,var_Level1,var_Level2; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.HeaderHeight(24); exg2antt1.Columns().Add("Default"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.DrawDateTicker(true); com_Chart.DrawGridLines(2/*exVLines*/); com_Chart.NonworkingDays(0); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,0); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2007",213))); com_Chart.LevelCount(3); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Label("<%yyyy%>"); com_Level.Unit(0/*exYear*/); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Alignment(1/*CenterAlignment*/); com_Level1.Label("<%hy%>"); com_Level1.Unit(1/*exHalfYear*/); com_Level1.ReplaceLabel("1","<b>1/2</b>"); com_Level1.ReplaceLabel("2","<b>2/2</b>"); var_Level2 = com_Chart.Level(2); com_Level2 = var_Level2; com_Level2.Label("<%mmm%>"); com_Level2.Unit(16/*exMonth*/); com_Chart.UnitWidth(28); com_Chart.AllowInsideZoom(true); var_InsideZoomFormat = com_Chart.DefaultInsideZoomFormat(); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.OwnerLabel("<b><%mmmm%></b> (weeks) "); com_InsideZoomFormat.InsideLabel("<font ;6>W: <b><%ww%></b>"); com_InsideZoomFormat.InsideUnit(256/*exWeek*/); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; com_InsideZooms.SplitBaseLevel(false); var_InsideZoom = com_InsideZooms.Add(COMVariant::createFromDate(str2Date("1/1/2007",213))); com_InsideZoom = var_InsideZoom; com_InsideZoom.AllowCustomFormat(true); var_InsideZoomFormat1 = com_InsideZoom.CustomFormat(); com_InsideZoomFormat1 = var_InsideZoomFormat1; com_InsideZoomFormat1.OwnerLabel("<b><%mmmm%></b> (weeks) "); com_InsideZoomFormat1.InsideLabel("<font ;6>W: <b><%ww%></b>"); com_InsideZoomFormat1.InsideUnit(256/*exWeek*/); com_InsideZoomFormat1.BackColorChart(WinApi::RGB2int(187,231,240)); var_InsideZoom1 = com_InsideZooms.Add(COMVariant::createFromDate(str2Date("3/1/2007",213))); com_InsideZoom1 = var_InsideZoom1; com_InsideZoom1.AllowCustomFormat(true); com_InsideZoom1.Width(356); var_InsideZoomFormat2 = com_InsideZoom1.CustomFormat(); com_InsideZoomFormat2 = var_InsideZoomFormat2; com_InsideZoomFormat2.OwnerLabel("<b><%mmmm%></b> (days) "); com_InsideZoomFormat2.InsideLabel("<font ;5><%d%></font>"); com_InsideZoomFormat2.InsideUnit(4096/*exDay*/); com_InsideZoomFormat2.BackColorChart(WinApi::RGB2int(145,200,240)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1 "); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/12/2007",213)),COMVariant::createFromDate(str2Date("3/9/2007",213))); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/25/2007",213)),COMVariant::createFromDate(str2Date("3/12/2007",213))); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("2/1/2007",213)),COMVariant::createFromDate(str2Date("2/8/2007",213)),"B1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("2/8/2007",213)),COMVariant::createFromDate(str2Date("2/15/2007",213)),"B2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("2/15/2007",213)),COMVariant::createFromDate(str2Date("2/22/2007",213)),"B3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("2/22/2007",213)),COMVariant::createFromDate(str2Date("2/28/2007",213)),"B4"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,0); } */ |
879 |
How can I define a bar that shows two colors, one up and one down, without using skin or EBN files
public void init() { COM com_Bar,com_Bar1,com_Bar2,com_Items; anytype var_Bar,var_Bar1,var_Bar2,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Bar = COM::createFromObject(exg2antt1.Chart().Bars()).Add("A"); com_Bar = var_Bar; com_Bar.Color(WinApi::RGB2int(255,0,0)); com_Bar.Shape(2/*exShapeSolidUp*/); com_Bar.Pattern(1/*exPatternSolid*/); var_Bar1 = COM::createFromObject(exg2antt1.Chart().Bars()).Add("B"); com_Bar1 = var_Bar1; com_Bar1.Color(WinApi::RGB2int(128,0,0)); com_Bar1.Shape(4/*exShapeSolidDown*/); com_Bar1.Pattern(1/*exPatternSolid*/); var_Bar2 = COM::createFromObject(exg2antt1.Chart().Bars()).Add("A%B"); com_Bar2 = var_Bar2; com_Bar2.Shortcut("AB"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"AB",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.ItemBar(h,"K1",12/*exBarPercent*/,COMVariant::createFromInt(1)); com_Items.ItemBar(h,"K1",16/*exBarCanResizePercent*/,COMVariant::createFromBoolean(false)); exg2antt1.EndUpdate(); } |
878 |
Does your control support RightToLeft property for RTL languages or right to left
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.ScrollBars(15/*exDisableBoth*/); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("P1")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); exg2antt1.RightToLeft(true); exg2antt1.EndUpdate(); } |
877 |
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right
|
876 |
Can I display the cell's check box after the text
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Column")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.Def(34/*exCellDrawPartsOrder*/,"caption,check"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellHasCheckBox(com_Items.AddItem("Caption 1"),COMVariant::createFromInt(0),true); com_Items.CellHasCheckBox(com_Items.AddItem("Caption 2"),COMVariant::createFromInt(0),true); } |
875 |
Can I change the order of the parts in the cell, as checkbox after the text, and so on
public void init() { COM com_Items; anytype var_Items; int h; str var_s; ; super(); var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql"; var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0"; var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN"; var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="; exg2antt1.Images(COMVariant::createFromStr(var_s)); COM::createFromVariant(exg2antt1.Columns().Add("Column")).Def(34/*exCellDrawPartsOrder*/,"caption,check,icon,icons,picture"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Text"); com_Items.CellImage(h,COMVariant::createFromInt(0),1); com_Items.CellHasCheckBox(h,COMVariant::createFromInt(0),true); } |
874 |
Can I have an image displayed after the text. Can I get that effect without using HTML content
public void init() { COM com_Items; anytype var_Items; int h; str var_s; ; super(); var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql"; var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0"; var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN"; var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="; exg2antt1.Images(COMVariant::createFromStr(var_s)); COM::createFromVariant(exg2antt1.Columns().Add("Column")).Def(34/*exCellDrawPartsOrder*/,"caption,icon,check,icons,picture"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Text"); com_Items.CellImage(h,COMVariant::createFromInt(0),1); } |
873 |
My problem is that I want to mark the cells from every second item in the gant with a other backgroundcolor
|
872 |
Is there any option to print the columns section on each page
public void init() { COM com_Items,com_Print; anytype var_Items,var_Print; int h1,h2; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Col 1"); exg2antt1.Columns().Add("Col 2"); exg2antt1.MarkSearchColumn(false); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); exg2antt1.Chart().LevelCount(2); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Col 1"); com_Items.CellValue(h1,COMVariant::createFromInt(1),"Col 2"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Col 1"); com_Items.CellValue(h2,COMVariant::createFromInt(1),"Col 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("2/5/2001",213)),COMVariant::createFromDate(str2Date("2/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",6/*exLinkStartPos*/,COMVariant::createFromInt(0)); exg2antt1.EndUpdate(); // Add 'exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print; com_Print.Options("ColumnsOnEveryPage=-2"); com_Print.PrintExt(exg2antt1); com_Print.Preview(); } |
871 |
How can I add a different non-working area for different items
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.Columns().Add("Non-Work"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/24/2008",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,52); com_Chart.LevelCount(2); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("January"); com_Items.ItemNonworkingUnits(h,COMVariant::createFromBoolean(false),"month(value) = 1"); h = com_Items.AddItem("February, Saturday, Sunday"); com_Items.ItemNonworkingUnits(h,COMVariant::createFromBoolean(false),"month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)"); h = com_Items.AddItem("Sunday"); com_Items.ItemNonworkingUnits(h,COMVariant::createFromBoolean(false),"weekday(value) = 0"); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,52); } */ |
870 |
How can I define different non-working units for different items
public void init() { COM com_Bar,com_Bars,com_Chart,com_InsideZoomFormat,com_InsideZooms,com_Items,com_Level; anytype var_Bar,var_Bars,var_Chart,var_InsideZoomFormat,var_InsideZooms,var_Items,var_Level; int h,h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,78); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.DrawLevelSeparator(false); com_Chart.LevelCount(3); var_Level = COM::createFromObject(com_Chart.Level(1)); com_Level = var_Level; com_Level.DrawGridLines(false); com_Chart.AllowInsideZoom(true); com_Chart.DrawDateTicker(true); com_Chart.DateTickerLabel("<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>"); com_Chart.MarkSelectDateColor(0x7ffff8ee); var_InsideZoomFormat = com_Chart.DefaultInsideZoomFormat(); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.OwnerLabel("<%mmm%> <%d%>"); com_InsideZoomFormat.BackColor(WinApi::RGB2int(238,248,255)); com_InsideZoomFormat.BackColorChart(com_InsideZoomFormat.BackColor()); com_InsideZoomFormat.InsideCount(4); com_InsideZoomFormat.InsideLabel("<b><%hh%></b>"); var_InsideZooms = COM::createFromObject(com_Chart.InsideZooms()); com_InsideZooms = var_InsideZooms; com_InsideZooms.Add(COMVariant::createFromDate(str2Date("6/22/2005",213))); com_Chart.DrawGridLines(2/*exVLines*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Split"); com_Bar = var_Bar; com_Bar.Color(WinApi::RGB2int(255,0,0)); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Color(WinApi::RGB2int(255,0,0)); com_Bar.Pattern(6/*exPatternBDiagonal*/); com_Bar.Shortcut("TaskS"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project 1"); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("7/1/2005",213))); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"TaskS",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("6/28/2005",213))); com_Items.ItemNonworkingUnits(h1,COMVariant::createFromBoolean(false),"weekday(value)=1 or weekday(value)=2"); com_Items.ItemNonworkingUnits(h1,COMVariant::createFromBoolean(true),"weekday(value)=1 or weekday(value)=2 or (hour(value)<8 or hour(value)>=16 )"); com_Items.DefineSummaryBars(h,"",h1,""); h1 = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(h1,"TaskS",COMVariant::createFromUtcDateTime(str2Datetime("6/22/2005 4:00:00",213)),COMVariant::createFromDate(str2Date("7/1/2005",213)),"E"); com_Items.ItemNonworkingUnits(h1,COMVariant::createFromBoolean(false),"weekday(value)=0"); com_Items.ItemNonworkingUnits(h1,COMVariant::createFromBoolean(true),"weekday(value)=0 or hour(value)<4 or hour(value)>19"); com_Items.DefineSummaryBars(h,"",h1,"E"); com_Items.ItemBar(h1,"E",21/*exBarEffort*/,COMVariant::createFromInt(5)); h1 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h1,"TaskS",COMVariant::createFromUtcDateTime(str2Datetime("6/22/2005 12:00:00",213)),COMVariant::createFromDate(str2Date("6/27/2005",213)),"E"); com_Items.ItemNonworkingUnits(h1,COMVariant::createFromBoolean(false),"weekday(value)=1 or weekday(value)=2"); com_Items.ItemNonworkingUnits(h1,COMVariant::createFromBoolean(true),"weekday(value)=1 or weekday(value)=2 or (hour(value)<8 or hour(value)>=16 )"); com_Items.DefineSummaryBars(h,"",h1,"E"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Project 2"); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("6/26/2005",213)),COMVariant::createFromDate(str2Date("7/6/2005",213))); h1 = com_Items.InsertItem(h,,"TaskS 1"); com_Items.AddBar(h1,"TaskS",COMVariant::createFromDate(str2Date("6/26/2005",213)),COMVariant::createFromDate(str2Date("7/2/2005",213))); com_Items.DefineSummaryBars(h,"",h1,""); h1 = com_Items.InsertItem(h,,"TaskS 2"); com_Items.AddBar(h1,"TaskS",COMVariant::createFromDate(str2Date("6/28/2005",213)),COMVariant::createFromDate(str2Date("7/6/2005",213)),"E"); com_Items.DefineSummaryBars(h,"",h1,"E"); com_Items.ItemBar(h1,"E",21/*exBarEffort*/,COMVariant::createFromInt(5)); h1 = com_Items.InsertItem(h,,"TaskS 3"); com_Items.AddBar(h1,"TaskS",COMVariant::createFromDate(str2Date("6/30/2005",213)),COMVariant::createFromDate(str2Date("7/2/2005",213)),"E"); com_Items.DefineSummaryBars(h,"",h1,"E"); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,78); } */ |
869 |
I want to define/highlight for specified dates as being non-working. Is this possible
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; ULong c; anytype var_Bar,var_Bars,var_Chart,var_Items; int h,p; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Items"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.NonworkingDaysColor(WinApi::RGB2int(255,0,0)); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,48); c = com_Chart.NonworkingDaysColor(); p = com_Chart.NonworkingDaysPattern(); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("NW"); com_Bar = var_Bar; com_Bar.Color(c); com_Bar.Pattern(p); com_Bar.Height(-1); com_Bar.Shape(17/*exShapeSolidFrameless*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Item 1"); com_Items.AddBar(h,"NW",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/3/2001",213)),"0"); com_Items.ItemBar(h,"0",29/*exBarSelectable*/,COMVariant::createFromBoolean(false)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K2"); h = com_Items.AddItem("Item 2"); com_Items.AddBar(h,"NW",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"0"); com_Items.ItemBar(h,"0",29/*exBarSelectable*/,COMVariant::createFromBoolean(false)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K2"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,48); } */ |
868 |
Do you have any sample how can I programmatically magnify a single date, so can show the hours, while the rest of the chart displays days
public void init() { COM com_Chart,com_Column,com_InsideZoomFormat,com_InsideZooms,com_Items,com_Level; anytype var_Chart,var_Column,var_InsideZoomFormat,var_InsideZooms,var_Items,var_Level; int h,h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.ShowFocusRect(false); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("C")); com_Column = var_Column; com_Column.HeaderAlignment(1/*CenterAlignment*/); com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); com_Column.AllowSizing(false); com_Column.Width(18); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,96); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.DrawLevelSeparator(false); com_Chart.LevelCount(3); var_Level = COM::createFromObject(com_Chart.Level(1)); com_Level = var_Level; com_Level.DrawGridLines(false); com_Chart.AllowInsideZoom(true); com_Chart.DrawDateTicker(true); com_Chart.DateTickerLabel("<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>"); com_Chart.MarkSelectDateColor(0x7ffff8ee); var_InsideZoomFormat = com_Chart.DefaultInsideZoomFormat(); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.OwnerLabel("<%mmm%> <%d%>"); com_InsideZoomFormat.BackColor(WinApi::RGB2int(238,248,255)); com_InsideZoomFormat.BackColorChart(com_InsideZoomFormat.BackColor()); com_InsideZoomFormat.InsideCount(4); com_InsideZoomFormat.InsideLabel("<b><%hh%></b>"); var_InsideZooms = COM::createFromObject(com_Chart.InsideZooms()); com_InsideZooms = var_InsideZooms; com_InsideZooms.Add(COMVariant::createFromDate(str2Date("6/22/2005",213))); com_Chart.DrawGridLines(2/*exVLines*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project 1"); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("7/1/2005",213))); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("6/28/2005",213))); com_Items.CellMerge(h1,COMVariant::createFromInt(0),COMVariant::createFromInt(1)); com_Items.DefineSummaryBars(h,"",h1,""); h1 = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/23/2005",213)),COMVariant::createFromDate(str2Date("7/1/2005",213)),"E"); com_Items.CellMerge(h1,COMVariant::createFromInt(0),COMVariant::createFromInt(1)); com_Items.DefineSummaryBars(h,"",h1,"E"); com_Items.ItemBar(h1,"E",21/*exBarEffort*/,COMVariant::createFromInt(5)); h1 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/25/2005",213)),COMVariant::createFromDate(str2Date("6/27/2005",213)),"E"); com_Items.CellMerge(h1,COMVariant::createFromInt(0),COMVariant::createFromInt(1)); com_Items.DefineSummaryBars(h,"",h1,"E"); com_Items.ExpandItem(h,true); com_Items.CellState(h,COMVariant::createFromInt(1),1); h = com_Items.AddItem("Project 2"); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("6/26/2005",213)),COMVariant::createFromDate(str2Date("7/6/2005",213))); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/26/2005",213)),COMVariant::createFromDate(str2Date("7/2/2005",213))); com_Items.CellMerge(h1,COMVariant::createFromInt(0),COMVariant::createFromInt(1)); com_Items.DefineSummaryBars(h,"",h1,""); h1 = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/28/2005",213)),COMVariant::createFromDate(str2Date("7/6/2005",213)),"E"); com_Items.CellMerge(h1,COMVariant::createFromInt(0),COMVariant::createFromInt(1)); com_Items.DefineSummaryBars(h,"",h1,"E"); com_Items.ItemBar(h1,"E",21/*exBarEffort*/,COMVariant::createFromInt(5)); h1 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/30/2005",213)),COMVariant::createFromDate(str2Date("7/2/2005",213)),"E"); com_Items.CellMerge(h1,COMVariant::createFromInt(0),COMVariant::createFromInt(1)); com_Items.DefineSummaryBars(h,"",h1,"E"); com_Items.ExpandItem(h,true); com_Items.CellState(h,COMVariant::createFromInt(1),1); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,96); } */ |
867 |
How can I define my own/custom labels and subdivisions
public void init() { COM com_Chart,com_Level,com_Level1,com_Level2; anytype var_Chart,var_Level,var_Level1,var_Level2; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.ToolTip(""); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,0); com_Chart.ScrollRange(0/*exStartDate*/,COMVariant::createFromInt(0)); com_Chart.ScrollRange(1/*exEndDate*/,COMVariant::createFromInt(110)); com_Chart.FirstVisibleDate(COMVariant::createFromInt(0)); com_Chart.ShowNonworkingDates(false); com_Chart.MarkTodayColor(com_Chart.BackColor()); com_Chart.LevelCount(3); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.ToolTip(""); com_Level.Alignment(1/*CenterAlignment*/); com_Level.Unit(4096/*exDay*/); com_Level.Count(16); com_Level.FormatLabel("'Group <b>'+int(1 +dvalue/16)"); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.ToolTip(""); com_Level1.Alignment(1/*CenterAlignment*/); com_Level1.Unit(4096/*exDay*/); com_Level1.Count(4); com_Level1.FormatLabel(" (abs(dvalue)/4) mod 4"); com_Level1.ReplaceLabel("0","Sub-Group <b>1</b>"); com_Level1.ReplaceLabel("1","Sub-Group <b>2</b>"); com_Level1.ReplaceLabel("2","Sub-Group <b>3</b>"); com_Level1.ReplaceLabel("3","Sub-Group <b>4</b>"); var_Level2 = com_Chart.Level(2); com_Level2 = var_Level2; com_Level2.ToolTip(""); com_Level2.Unit(4096/*exDay*/); com_Level2.Count(1); com_Level2.FormatLabel("(abs(dvalue) mod 4)"); com_Level2.ReplaceLabel("0","A"); com_Level2.ReplaceLabel("1","B"); com_Level2.ReplaceLabel("2","C"); com_Level2.ReplaceLabel("3","D"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,0); } */ |
866 |
I want to mark or highlight the last Friday of the month. Is there any option to do that
|
865 |
I use the SelectDate method but the dates are not being highligted. What can I do
|
864 |
Can I use ebn files to display the selected dates
public void init() { COM com_Appearance,com_Chart,com_Items; anytype var_Appearance,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; com_Appearance.Add(2,"c:\\exontrol\\images\\normal.ebn"); com_Appearance.Add(1,"CP:2 0 -4 0 4"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.MarkTodayColor(com_Chart.BackColor()); com_Chart.LevelCount(2); com_Chart.MarkSelectDateColor(0x1000000); com_Chart.SelectLevel(1); com_Chart.SelectDate(str2Date("1/3/2008",213),true); com_Chart.SelectDate(str2Date("1/4/2008",213),true); exg2antt1.Columns().Add("Default"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2008",213)),COMVariant::createFromDate(str2Date("1/6/2008",213))); com_Items.AddBar(com_Items.AddItem("Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2008",213)),COMVariant::createFromDate(str2Date("1/7/2008",213))); com_Items.AddBar(com_Items.AddItem("Item 3"),"Task",COMVariant::createFromDate(str2Date("1/4/2008",213)),COMVariant::createFromDate(str2Date("1/8/2008",213))); com_Items.AddBar(com_Items.AddItem("Item 4"),"Task",COMVariant::createFromDate(str2Date("1/5/2008",213)),COMVariant::createFromDate(str2Date("1/9/2008",213))); exg2antt1.EndUpdate(); } |
863 |
Can I use ebn files to display the selected dates
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.MarkTodayColor(com_Chart.BackColor()); com_Chart.LevelCount(2); com_Chart.MarkSelectDateColor(0x1000000); com_Chart.SelectLevel(1); com_Chart.SelectDate(str2Date("1/3/2008",213),true); exg2antt1.Columns().Add("Default"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2008",213)),COMVariant::createFromDate(str2Date("1/6/2008",213))); com_Items.AddBar(com_Items.AddItem("Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2008",213)),COMVariant::createFromDate(str2Date("1/7/2008",213))); com_Items.AddBar(com_Items.AddItem("Item 3"),"Task",COMVariant::createFromDate(str2Date("1/4/2008",213)),COMVariant::createFromDate(str2Date("1/8/2008",213))); exg2antt1.EndUpdate(); } |
862 |
How can I change the color for selected dates to be solid
|
861 |
How can I disable selecting dates when I click the chart's header
|
860 |
Is there any option to specify which dates can be magnified or resized
|
859 |
How can I change the width for a specified date time unit
public void init() { COM com_Chart,com_InsideZoom,com_InsideZooms; anytype var_Chart,var_InsideZoom,var_InsideZooms; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.AllowInsideZoom(true); com_Chart.AllowResizeInsideZoom(false); com_Chart.InsideZoomOnDblClick(false); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; var_InsideZoom = com_InsideZooms.Add(COMVariant::createFromDate(str2Date("1/4/2008",213))); com_InsideZoom = var_InsideZoom; com_InsideZoom.Width(32); com_InsideZoom.AllowInsideFormat(false); exg2antt1.EndUpdate(); } |
858 |
How can I disable the control's splitter so the user can't resize the list area
|
857 |
How can I disable the control's splitter so the user can't resize the chart area
|
856 |
How can I change the label for a specified unit
public void init() { COM com_Chart,com_InsideZoom,com_InsideZoomFormat,com_InsideZooms; anytype var_Chart,var_InsideZoom,var_InsideZoomFormat,var_InsideZooms; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,0); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.AllowInsideZoom(true); com_Chart.AllowResizeInsideZoom(false); com_Chart.InsideZoomOnDblClick(false); var_InsideZoomFormat = COM::createFromObject(com_Chart.DefaultInsideZoomFormat()); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.OwnerLabel("<b><%d%></b> <%d2%>"); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; com_InsideZooms.SplitBaseLevel(false); com_InsideZooms.DefaultWidth(32); var_InsideZoom = COM::createFromObject(com_InsideZooms.Add(COMVariant::createFromDate(str2Date("1/4/2008",213)))); com_InsideZoom = var_InsideZoom; com_InsideZoom.AllowInsideFormat(false); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,0); } */ |
855 |
How can I bold the inside units
public void init() { COM com_Chart,com_InsideZoomFormat,com_InsideZooms; anytype var_Chart,var_InsideZoomFormat,var_InsideZooms; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,0); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.AllowInsideZoom(true); com_Chart.AllowResizeInsideZoom(false); com_Chart.InsideZoomOnDblClick(false); var_InsideZoomFormat = COM::createFromObject(com_Chart.DefaultInsideZoomFormat()); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.InsideLabel("<b><%hh%></b>"); var_InsideZooms = COM::createFromObject(com_Chart.InsideZooms()); com_InsideZooms = var_InsideZooms; com_InsideZooms.Add(COMVariant::createFromDate(str2Date("1/4/2008",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,0); } */ |
854 |
How can I change the scale unit when doing inside zoom ( the chart displays weeks, and we want week days )
public void init() { COM com_Chart,com_InsideZoomFormat,com_InsideZooms,com_Level,com_Level1; anytype var_Chart,var_InsideZoomFormat,var_InsideZooms,var_Level,var_Level1; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.ShowNonworkingDates(false); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,0); com_Chart.LevelCount(2); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Label("<%mmmm%>"); com_Level.Unit(16/*exMonth*/); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Label("<%ww%>"); com_Level1.Unit(256/*exWeek*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.AllowInsideZoom(true); var_InsideZoomFormat = com_Chart.DefaultInsideZoomFormat(); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.OwnerLabel("<font ;7><%mmm%> Week: <%ww%>"); com_InsideZoomFormat.InsideLabel("<font ;7><b><%d1%></b>"); com_InsideZoomFormat.InsideUnit(4096/*exDay*/); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; com_InsideZooms.SplitBaseLevel(false); com_InsideZooms.Add(COMVariant::createFromDate(str2Date("2/3/2008",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,0); } */ |
853 |
How can I zoom or magnify the selected date to display the hours, from 8 to 8
public void init() { COM com_Chart,com_InsideZoomFormat,com_InsideZooms; anytype var_Chart,var_InsideZoomFormat,var_InsideZooms; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,0); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.AllowInsideZoom(true); var_InsideZoomFormat = com_Chart.DefaultInsideZoomFormat(); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.InsideLabel("H: <b><%hh%></b>"); com_InsideZoomFormat.InsideUnit(65536/*exHour*/); com_InsideZoomFormat.InsideCount(8); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; com_InsideZooms.Add(COMVariant::createFromDate(str2Date("1/4/2008",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,0); } */ |
852 |
How can I zoom or magnify the selected date to display the hours
|
851 |
How can I change the foreground color for a time unit
public void init() { COM com_Chart,com_InsideZoom,com_InsideZoomFormat,com_InsideZooms; anytype var_Chart,var_InsideZoom,var_InsideZoomFormat,var_InsideZooms; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.AllowInsideZoom(true); com_Chart.AllowResizeInsideZoom(false); com_Chart.InsideZoomOnDblClick(false); var_InsideZoomFormat = COM::createFromObject(com_Chart.DefaultInsideZoomFormat()); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.ForeColor(WinApi::RGB2int(255,0,0)); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; com_InsideZooms.SplitBaseLevel(false); com_InsideZooms.DefaultWidth(18); var_InsideZoom = COM::createFromObject(com_InsideZooms.Add(COMVariant::createFromDate(str2Date("1/4/2008",213)))); com_InsideZoom = var_InsideZoom; com_InsideZoom.AllowInsideFormat(false); exg2antt1.EndUpdate(); } |
850 |
How can I change the background color for a time unit, in the chart area
public void init() { COM com_Chart,com_InsideZoom,com_InsideZoomFormat,com_InsideZooms; anytype var_Chart,var_InsideZoom,var_InsideZoomFormat,var_InsideZooms; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.AllowInsideZoom(true); com_Chart.AllowResizeInsideZoom(false); com_Chart.InsideZoomOnDblClick(false); var_InsideZoomFormat = COM::createFromObject(com_Chart.DefaultInsideZoomFormat()); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.BackColorChart(WinApi::RGB2int(255,0,0)); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; com_InsideZooms.SplitBaseLevel(false); com_InsideZooms.DefaultWidth(18); var_InsideZoom = COM::createFromObject(com_InsideZooms.Add(COMVariant::createFromDate(str2Date("1/4/2008",213)))); com_InsideZoom = var_InsideZoom; com_InsideZoom.AllowInsideFormat(false); exg2antt1.EndUpdate(); } |
849 |
How can I change the background color for a time unit, using EBN files
public void init() { COM com_Chart,com_InsideZoom,com_InsideZoomFormat,com_InsideZooms; anytype var_Chart,var_InsideZoom,var_InsideZoomFormat,var_InsideZooms; ; super(); exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.AllowInsideZoom(true); com_Chart.AllowResizeInsideZoom(false); com_Chart.InsideZoomOnDblClick(false); var_InsideZoomFormat = COM::createFromObject(com_Chart.DefaultInsideZoomFormat()); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.BackColor(0x1000000); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; com_InsideZooms.SplitBaseLevel(false); com_InsideZooms.DefaultWidth(18); var_InsideZoom = COM::createFromObject(com_InsideZooms.Add(COMVariant::createFromDate(str2Date("1/4/2008",213)))); com_InsideZoom = var_InsideZoom; com_InsideZoom.AllowInsideFormat(false); exg2antt1.EndUpdate(); } |
848 |
How can I change the background color for a time unit
public void init() { COM com_Chart,com_InsideZoom,com_InsideZoomFormat,com_InsideZooms; anytype var_Chart,var_InsideZoom,var_InsideZoomFormat,var_InsideZooms; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2008",213))); com_Chart.AllowInsideZoom(true); com_Chart.AllowResizeInsideZoom(false); com_Chart.InsideZoomOnDblClick(false); var_InsideZoomFormat = COM::createFromObject(com_Chart.DefaultInsideZoomFormat()); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.BackColor(WinApi::RGB2int(255,0,0)); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; com_InsideZooms.SplitBaseLevel(false); com_InsideZooms.DefaultWidth(18); var_InsideZoom = COM::createFromObject(com_InsideZooms.Add(COMVariant::createFromDate(str2Date("1/4/2008",213)))); com_InsideZoom = var_InsideZoom; com_InsideZoom.AllowInsideFormat(false); exg2antt1.EndUpdate(); } |
847 |
How can I display the column using currency format and enlarge the font for certain values
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Currency")); com_Column = var_Column; com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.FormatColumn("len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("1.23"); com_Items.AddItem("2.34"); com_Items.AddItem("9.94"); com_Items.AddItem("11.94"); com_Items.AddItem("1000"); } |
846 |
How can I highlight only parts of the cells
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("")); com_Column = var_Column; com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.FormatColumn("value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.InsertItem(h,,"Child 3"); com_Items.ExpandItem(h,true); } |
845 |
How can I get the number of occurrences of a specified string in the cell
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.Columns().Add(""); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("occurrences")); com_Column = var_Column; com_Column.ComputedField("lower(%0) count 'o'"); com_Column.FormatColumn("'contains ' + value + ' of \\'o\\' chars'"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1 oooof the root"); com_Items.InsertItem(h,,"Child 2"); com_Items.InsertItem(h,,"Child 3"); com_Items.ExpandItem(h,true); } |
844 |
How can I display dates in my format
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Date")); com_Column = var_Column; com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.FormatColumn("'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromDate(str2Date("1/21/2001",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("2/22/2002",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("3/13/2003",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("4/24/2004",213))); } |
843 |
How can I display dates in short format
public void init() { COM com_Items; anytype var_Items; ; super(); COM::createFromVariant(exg2antt1.Columns().Add("Date")).FormatColumn("shortdate(value)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("2/2/2002",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("3/3/2003",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("4/4/2004",213))); } |
842 |
How can I display dates in long format
public void init() { COM com_Items; anytype var_Items; ; super(); COM::createFromVariant(exg2antt1.Columns().Add("Date")).FormatColumn("longdate(value)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("2/2/2002",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("3/3/2003",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("4/4/2004",213))); } |
841 |
How can I display only the right part of the cell
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.Columns().Add(""); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Right")); com_Column = var_Column; com_Column.ComputedField("%0 right 2"); com_Column.FormatColumn("'\"' + value + '\"'"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.InsertItem(h,,"SChild 3"); com_Items.ExpandItem(h,true); } |
840 |
How can I display only the left part of the cell
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.Columns().Add(""); COM::createFromVariant(exg2antt1.Columns().Add("Left")).ComputedField("%0 left 2"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.InsertItem(h,,"SChild 3"); com_Items.ExpandItem(h,true); } |
839 |
How can I display true or false instead 0 and -1
public void init() { COM com_Items; anytype var_Items; ; super(); COM::createFromVariant(exg2antt1.Columns().Add("Boolean")).FormatColumn("value != 0 ? 'true' : 'false'"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromBoolean(true)); com_Items.AddItem(COMVariant::createFromBoolean(false)); com_Items.AddItem(COMVariant::createFromBoolean(true)); com_Items.AddItem(COMVariant::createFromInt(0)); com_Items.AddItem(COMVariant::createFromInt(1)); } |
838 |
Is there any option to print the columns section on each page
public void init() { COM com_Items,com_Print; anytype var_Items,var_Print; int h1,h2; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); exg2antt1.Chart().LevelCount(2); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("2/5/2001",213)),COMVariant::createFromDate(str2Date("2/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",6/*exLinkStartPos*/,COMVariant::createFromInt(0)); exg2antt1.EndUpdate(); // Add 'exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print; com_Print.Options("ColumnsOnEveryPage=1"); com_Print.PrintExt(exg2antt1); com_Print.Preview(); } |
837 |
How do I print the control's content
public void init() { COM com_Items,com_Print; anytype var_Items,var_Print; int h1,h2; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",6/*exLinkStartPos*/,COMVariant::createFromInt(0)); exg2antt1.EndUpdate(); // Add 'exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print; com_Print.PrintExt(exg2antt1); com_Print.Preview(); } |
836 |
How can I display icons or images instead numbers
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; str var_s; ; super(); var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql"; var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0"; var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN"; var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="; exg2antt1.Images(COMVariant::createFromStr(var_s)); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Icons")); com_Column = var_Column; com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.FormatColumn("'The cell displays the icon <img>'+value+'</img> instead ' + value"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromInt(1)); com_Items.AddItem(COMVariant::createFromInt(2)); com_Items.AddItem(COMVariant::createFromInt(3)); } |
835 |
How can I display the column using currency
public void init() { COM com_Items; anytype var_Items; ; super(); COM::createFromVariant(exg2antt1.Columns().Add("Currency")).FormatColumn("currency(dbl(value))"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("1.23"); com_Items.AddItem("2.34"); com_Items.AddItem("0"); com_Items.AddItem(COMVariant::createFromInt(5)); com_Items.AddItem("10000.99"); } |
834 |
How can I display the currency only for not empty cells
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Number"); COM::createFromVariant(exg2antt1.Columns().Add("Currency")).ComputedField("len(%0) ? currency(dbl(%0)) : ''"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("1.23"); com_Items.AddItem("2.34"); com_Items.AddItem("0"); com_Items.ItemBackColor(com_Items.AddItem(),WinApi::RGB2int(255,128,128)); com_Items.AddItem("10000.99"); } |
833 |
Is there a function to display the number of days between two date including the number of hours
public void init() { COM com_Items; anytype var_Items; int h; str var_s; ; super(); COM::createFromVariant(exg2antt1.Columns().Add("Start")).Width(32); exg2antt1.Columns().Add("End"); var_s = "((1:=int(0:= (date(%1)-date(%0)))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*"; var_s = var_s + "24))) != 0 ? =:1 + ' hour(s) ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"; COM::createFromVariant(exg2antt1.Columns().Add("Duration")).ComputedField(var_s); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem(COMVariant::createFromDate(str2Date("1/11/2001",213))); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("1/14/2001",213))); h = com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/22/2002 12:00:00",213))); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromUtcDateTime(str2Datetime("3/14/2002 13:00:00",213))); h = com_Items.AddItem(COMVariant::createFromDate(str2Date("3/13/2003",213))); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromUtcDateTime(str2Datetime("4/11/2003 11:00:00",213))); } |
832 |
Is there a function to display the number of days between two date including the number of hours
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.Columns().Add("Start"); exg2antt1.Columns().Add("End"); COM::createFromVariant(exg2antt1.Columns().Add("Duration")).ComputedField("\"D \" + int(date(%1)-date(%0)) + \" H \" + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem(COMVariant::createFromDate(str2Date("1/11/2001",213))); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromUtcDateTime(str2Datetime("1/14/2001 23:00:00",213))); h = com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/22/2002 12:00:00",213))); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromUtcDateTime(str2Datetime("3/14/2002 13:00:00",213))); h = com_Items.AddItem(COMVariant::createFromDate(str2Date("3/13/2003",213))); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromUtcDateTime(str2Datetime("4/11/2003 11:00:00",213))); } |
831 |
How can I display the number of days between two dates
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.Columns().Add("Start"); exg2antt1.Columns().Add("End"); COM::createFromVariant(exg2antt1.Columns().Add("Duration")).ComputedField("(date(%1)-date(%0)) + ' days'"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem(COMVariant::createFromDate(str2Date("1/11/2001",213))); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("1/14/2001",213))); h = com_Items.AddItem(COMVariant::createFromDate(str2Date("2/22/2002",213))); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("3/14/2002",213))); h = com_Items.AddItem(COMVariant::createFromDate(str2Date("3/13/2003",213))); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("4/11/2003",213))); } |
830 |
How can I get second part of the date
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Date"); COM::createFromVariant(exg2antt1.Columns().Add("Second")).ComputedField("sec(date(%0))"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("1/11/2001 10:10:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/22/2002 11:01:22",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("3/13/2003 12:23:01",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("4/14/2004 13:11:59",213))); } |
829 |
How can I get minute part of the date
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Date"); COM::createFromVariant(exg2antt1.Columns().Add("Minute")).ComputedField("min(date(%0))"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("1/11/2001 10:10:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/22/2002 11:01:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("3/13/2003 12:23:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("4/14/2004 13:11:00",213))); } |
828 |
How can I check the hour part only so I know it was afternoon
public void init() { COM com_ConditionalFormat,com_Items; anytype var_ConditionalFormat,var_Items; ; super(); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("hour(%0)>=12"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.Bold(true); exg2antt1.Columns().Add("Date"); COM::createFromVariant(exg2antt1.Columns().Add("Hour")).ComputedField("hour(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("1/11/2001 10:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/22/2002 11:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("3/13/2003 12:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("4/14/2004 13:00:00",213))); } |
827 |
What about a function to get the day in the week, or days since Sunday
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Date"); COM::createFromVariant(exg2antt1.Columns().Add("WeekDay")).ComputedField("weekday(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("1/11/2001 10:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/22/2002 11:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("3/13/2003 12:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("4/14/2004 13:00:00",213))); } |
826 |
Is there any function to get the day of the year or number of days since January 1st
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Date"); COM::createFromVariant(exg2antt1.Columns().Add("Day since January 1st")).ComputedField("yearday(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("1/11/2001 10:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/22/2002 11:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("3/13/2003 12:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("4/14/2004 13:00:00",213))); } |
825 |
How can I display only the day of the date
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Date"); COM::createFromVariant(exg2antt1.Columns().Add("Day")).ComputedField("day(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("1/11/2001 10:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/22/2002 11:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("3/13/2003 12:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("4/14/2004 13:00:00",213))); } |
824 |
How can I display only the month of the date
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Date"); COM::createFromVariant(exg2antt1.Columns().Add("Month")).ComputedField("month(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 10:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/2/2002 11:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("3/3/2003 12:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("4/4/2004 13:00:00",213))); } |
823 |
How can I get only the year part from a date expression
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Date"); COM::createFromVariant(exg2antt1.Columns().Add("Year")).ComputedField("year(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 10:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/2/2002 11:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("3/3/2003 12:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("4/4/2004 13:00:00",213))); } |
822 |
Can I convert the expression to date
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Number"); COM::createFromVariant(exg2antt1.Columns().Add("Date")).ComputedField("date(dbl(%0))"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("-1.98"); com_Items.AddItem("30000.99"); com_Items.AddItem("3561.23"); com_Items.AddItem("1232.34"); } |
821 |
Can I convert the expression to a number, double or float
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Number"); COM::createFromVariant(exg2antt1.Columns().Add("Number + 2")).ComputedField("dbl(%0)+2"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("-1.98"); com_Items.AddItem("0.99"); com_Items.AddItem("1.23"); com_Items.AddItem("2.34"); } |
820 |
How can I display dates in long format
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Date"); COM::createFromVariant(exg2antt1.Columns().Add("LongFormat")).ComputedField("longdate(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 10:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/2/2002 11:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("3/3/2003 12:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("4/4/2004 13:00:00",213))); } |
819 |
How can I display dates in short format
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Date"); COM::createFromVariant(exg2antt1.Columns().Add("ShortFormat")).ComputedField("shortdate(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 10:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/2/2002 11:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("3/3/2003 12:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("4/4/2004 13:00:00",213))); } |
818 |
How can I display the time only of a date expression
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Date"); COM::createFromVariant(exg2antt1.Columns().Add("Time")).ComputedField("'time is:' + time(date(%0))"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 10:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("2/2/2002 11:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("3/3/2003 12:00:00",213))); com_Items.AddItem(COMVariant::createFromUtcDateTime(str2Datetime("4/4/2004 13:00:00",213))); } |
817 |
Is there any function to display currencies, or money formatted as in the control panel
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Number"); COM::createFromVariant(exg2antt1.Columns().Add("Currency")).ComputedField("currency(dbl(%0))"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromReal(1.23)); com_Items.AddItem(COMVariant::createFromReal(2.34)); com_Items.AddItem(COMVariant::createFromReal(10000.99)); } |
816 |
How can I convert the expression to a string so I can look into the date string expression for month's name
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Number"); COM::createFromVariant(exg2antt1.Columns().Add("Str")).ComputedField("str(%0) + ' AA'"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("-1.98"); com_Items.AddItem("0.99"); com_Items.AddItem("1.23"); com_Items.AddItem("2.34"); } |
815 |
Can I display the absolute value or positive part of the number
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Number"); COM::createFromVariant(exg2antt1.Columns().Add("Abs")).ComputedField("abs(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("-1.98"); com_Items.AddItem("0.99"); com_Items.AddItem("1.23"); com_Items.AddItem("2.34"); } |
814 |
Is there any function to get largest number with no fraction part that is not greater than the value
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Number"); COM::createFromVariant(exg2antt1.Columns().Add("Floor")).ComputedField("floor(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("-1.98"); com_Items.AddItem("0.99"); com_Items.AddItem("1.23"); com_Items.AddItem("2.34"); } |
813 |
Is there any function to round the values base on the .5 value
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Number"); COM::createFromVariant(exg2antt1.Columns().Add("Round")).ComputedField("round(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("-1.98"); com_Items.AddItem("0.99"); com_Items.AddItem("1.23"); com_Items.AddItem("2.34"); } |
812 |
How can I get or display the integer part of the cell
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Number"); COM::createFromVariant(exg2antt1.Columns().Add("Int")).ComputedField("int(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("-1.98"); com_Items.AddItem("0.99"); com_Items.AddItem("1.23"); com_Items.AddItem("2.34"); } |
811 |
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )
public void init() { COM com_Items; anytype var_Items; int h; ; super(); COM::createFromVariant(exg2antt1.Columns().Add("")).FormatColumn("proper(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("root"); com_Items.InsertItem(h,,"child child"); com_Items.InsertItem(h,,"child child"); com_Items.InsertItem(h,,"child child"); com_Items.ExpandItem(h,true); } |
810 |
Is there any option to display cells in uppercase
public void init() { COM com_Items; anytype var_Items; int h; ; super(); COM::createFromVariant(exg2antt1.Columns().Add("")).FormatColumn("upper(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.InsertItem(h,,"Chld 3"); com_Items.ExpandItem(h,true); } |
809 |
Is there any option to display cells in lowercase
public void init() { COM com_Items; anytype var_Items; int h; ; super(); COM::createFromVariant(exg2antt1.Columns().Add("")).FormatColumn("lower(%0)"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.InsertItem(h,,"Chld 3"); com_Items.ExpandItem(h,true); } |
808 |
How can I mark the cells that has a specified type, ie strings only
|
807 |
How can I bold the items that contains data or those who displays empty strings
public void init() { COM com_ConditionalFormat,com_Items; anytype var_ConditionalFormat,var_Items; int h,hC; ; super(); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("not len(%1)=0"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.Bold(true); exg2antt1.Columns().Add("C1"); exg2antt1.Columns().Add("C2"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); hC = com_Items.InsertItem(h,,"Child 2"); com_Items.CellValue(hC,COMVariant::createFromInt(1),"1"); com_Items.InsertItem(h,,"Child 3"); com_Items.ExpandItem(h,true); } |
806 |
Can I change the background color for items or cells that contains a specified string
public void init() { COM com_ConditionalFormat,com_Items; anytype var_ConditionalFormat,var_Items; int h; ; super(); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%0 contains 'hi'"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(255,0,0)); exg2antt1.Columns().Add(""); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.InsertItem(h,,"Chld 3"); com_Items.ExpandItem(h,true); } |
805 |
Is there any option to change the fore color for cells or items that ends with a specified string
public void init() { COM com_ConditionalFormat,com_Items; anytype var_ConditionalFormat,var_Items; int h; ; super(); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%0 endwith '22'"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.ForeColor(WinApi::RGB2int(255,0,0)); exg2antt1.Columns().Add(""); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 1.22"); com_Items.InsertItem(h,,"Child 2.22"); com_Items.ExpandItem(h,true); } |
804 |
How can I highlight the cells or items that starts with a specified string
public void init() { COM com_ConditionalFormat,com_Items; anytype var_ConditionalFormat,var_Items; int h; ; super(); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%0 startwith 'C'"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.Underline(true); exg2antt1.Columns().Add(""); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.InsertItem(h,,"SChild 3"); com_Items.ExpandItem(h,true); } |
803 |
How can I change the background color or the visual appearance using ebn for a particular column
public void init() { COM com_Columns; anytype var_Columns; ; super(); exg2antt1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn"); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Column 1"); COM::createFromVariant(com_Columns.Add("Column 2")).Def(7/*exHeaderBackColor*/,COMVariant::createFromInt(16777216)); COM::createFromVariant(com_Columns.Add("Column 3")).Def(7/*exHeaderBackColor*/,COMVariant::createFromInt(16777471)); com_Columns.Add("Column 4"); } |
802 |
How can I change the foreground color for a particular column
|
801 |
How can I change the background color for a particular column
|